package com.boot.project.core.model.system.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @description:
 * @author: tsing
 * @create: 2021-01-22 21:21
 */
@Data
public class RoleSaveDto {

    private Long id;

    @NotBlank(message = "角色名称不能为空")
    @Length(min = 2, max = 20, message = "角色名称长度需要在2~20之间")
    private String roleName;

    @NotBlank(message = "描述信息不能为空")
    @Length(max = 200, message = "描述信息长度需要在200以内")
    private String description;

    @NotNull(message = "排序值不能为空")
    private Integer sort;

}
